package cn.wd.util;

import cn.wd.common.constant.RedisKeyConstants;

/**
 * @author wangdong
 * @date 2024/10/9 10:23
 * @Description:
 **/
public class CacheKey {

    public static String getRedisKey(String prefix, String param) {
        return String.format(prefix, param);
    }

    public static String getLockedKey(String param) {
        return String.format(RedisKeyConstants.LOGIN_ACCOUNT_LOCKED, param);
    }

    public static String getMaxErrorKey(String param) {
        return String.format(RedisKeyConstants.LOGIN_MAX_ERROR_COUNT, param);
    }

    public static String getTokenKey(String param) {
        return String.format(RedisKeyConstants.LOGIN_USER_TOKEN, param);
    }

    public static String getTokenUserKey(String param) {
        return String.format(RedisKeyConstants.LOGIN_USER_INFO, param);
    }
}
